#ifndef EGG_SINGLETON_H
#define EGG_SINGLETON_H

namespace egg {

    template <typename T>
    class Singleton {
    public:
        inline static shared_ptr<T> getSingletonPtr() {
            static shared_ptr<T> singleton;
            if(singleton==0){
                singleton=shared_ptr<T>(new T());
            }
            return singleton;
        }
    };
	
}

#endif
